package com.song.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Data
@Component
@TableName(value = "t_student")
public class Student implements Serializable {
   @TableId(value = "student_id",type = IdType.AUTO)
   private Integer studentId;
   @TableField(value = "student_name")
   private String studentName;
   @TableField(value = "gender")
   private String gender;
   @TableField(value = "telephone")
   private String telephone;
   @TableField(value = "check_date")
   @JsonFormat(pattern="yyyy-MM-dd")
   private Date checkDate;
   @TableField(value = "head_picture")
   private String headPicture;
   @TableField(value = "fk_netClass_id")
   private Integer netClassId;
   @TableField(exist = false)
   private NetClass netClass;
   @TableField(exist = false)
   private Room room;

   @Override
   public String toString() {
      return "Student{" + "studentId=" + studentId + ", studentName='" + studentName + '\'' + ", gender='" + gender + '\'' + ", telephone='" + telephone + '\'' + ", checkDate=" + checkDate + ", headPicture='" + headPicture + '\'' + ", netClassId=" + netClassId + ", netClass=" + netClass + ", room=" + room + '}';
   }
}
